# -*- coding: utf-8 -*-
"""
author:码同学 极光
date:2024/9/21
desc: 
sample: 
"""
#函数是不在对象里面的方法
def do_something1(a1,a2):
   print(f"type_a {type(a1)}, type_a2 {type(a2)} a1={a1}, a2={a2}");

do_something1(1,2)
do_something1(a2='test',a1=['1',12])

#可变
def do_something3(a1,*args):
  print(f"type_a {type(a1)}, type_args {type(args)} a1={a1}, a2={args}")


info1 = {
"age":18,
"status":True,
"name":"极光"
}

do_something3(1)
do_something3(1,11)
do_something3(9,11,123123)
do_something3(9,11,123123,1212)
do_something3(9,(11,123123,1212))
do_something3(9,info1)
#do_something3(9,a=1,b=1) 不支持
#可变 关键词 k,v
def do_something4(a1,**kwargs):
 print(f"type_a {type(a1)}, kwargs {type(kwargs)} a1={a1}, kwargs={kwargs}")

do_something4(1)
do_something4(1, a=1)
do_something4(9, a=1,b=1)
do_something4(9, a=1, b=1, c=1)
do_something4(9,**info1)


def do_something5(*args,**kwargs):
  print(f"type_a {type(args)}, kwargs {type(kwargs)} args={args}, kwargs={kwargs}")

do_something5(9,info1)
do_something5(9,info1,a=1)

print('1',end='__')
print(1,2)
print(1,2,3)